@extends('wap.layouts.master')
@section('title','球队详情')

@section('content')

<div class="aw-main aw-user aw-team aw-team-info">
	<div class="aw-bg-1 aw-info-top">
		<div class="aw-info-top-img"><img :src="info.img ? info.img : '/img/default_160_160.png'" onerror="javascript:this.src='/img/default_160_160.png';"></div>
		<div class="aw-info-top-name">@{{info.name}}</div>
		<ul class="aw-info-top-list">
			<li class="aw-info-li">
				<p>@{{info.people_number}}</p>
				<p><span>球队人数</span></p>
				<a :href="'/wap/team/player?team_id='+info.id" class="aw-position_a_a"></a>
			</li>
			<li class="aw-info-li">
				<p>@{{info.count}}</p>
				<p><span>完成比赛</span></p>
				<a :href="'/wap/team/match?team_id='+info.id" class="aw-position_a_a"></a>
			</li>
			<li class="aw-info-li">
				<p>@{{info.win}}%</p>
				<p><span>靠谱率</span></p>
			</li>
			<li class="aw-info-li-shu aw-left-3333"></li>
			<li class="aw-info-li-shu aw-right-3333"></li>
		</ul> 
	</div>
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li">
			<div class="aw-left">成立时间</div>
			<div class="aw-conter aw-text-right aw-color-777">@{{info.create_time}}</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">平均年龄</div>
			<div class="aw-conter aw-text-right aw-color-777">@{{info.avg_age}}</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">球队主色</div>
			<div class="aw-conter aw-text-right aw-color-777">@{{info.colour}}</div>
		</li>
	</ul>
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li aw-pl10">
			<div class="aw-left">球队介绍</div>
			<div class="aw-conter aw-conter-team aw-color-777">@{{info.desc}}</div>
		</li>
	</ul>
	<ul class="aw-assest-form aw-bg-fff aw-mt10">
		<li class="aw-form-li aw-pl10">
			<div class="aw-left">对手评价</div>
			<div class="aw-conter aw-conter-team aw-assest-tag-list">
				<div v-if="info.comment.length==0">暂无评价</div>
				<div class="aw-assest-tag-li" v-for="(list,key) in info.comment">
					<span class="aw-assest-btn aw-btn-bordercolor-333 aw-btn-radius">@{{list.content}} &nbsp;@{{list.content_num}}</span>
				</div>
			</div>
		</li>
	</ul>
	<div class="aw-pb50"></div>
</div>
<div v-if="info.is_admin==1" class="aw-bg-fff aw-foot-btn aw-foot-btn2 aw-foot-btn-team">
	<a data-href="javascript:;" :href="'/wap/team/join?team_id='+info.id" class="aw-assest-btn aw-btn-bgcolor-lvse">申请管理</a>
	<a data-href="javascript:;" :href="'/wap/team/edit?team_id='+info.id" class="aw-assest-btn aw-btn-bordercolor-lvse aw-foot-btn-team-info">资料编辑</a>
</div>

<div v-if="info.is_admin==0" class="aw-bg-fff aw-foot-btn aw-foot-btn2">
	<a v-if="info.is_join==0" v-on:click="Click_Team_Join()" href="javascript:;" class="aw-assest-btn aw-btn-bgcolor-lvse">我要加入</a>
	<a v-if="info.is_join==1" v-on:click="Click_Team_Out()" href="javascript:;" class="aw-assest-btn aw-btn-bordercolor-lvse">退出球队</a>
</div>

@section('pagejs')
@parent
<script type="text/javascript">
var MJS_URLArry=URLArry;
var Get_form={
	team_id:0,
}
$.extend(Get_form,MJS_URLArry);
var Vue_Data={
	info:{},
	form:Get_form
}
//球队详情
var AD_info={
	api:'/api/team/team-info',
	form_data:Get_form,
	tips:false,
}
getData(AD_info,function(ajax_data){
	Vue_Data.info=ajax_data;
})
//加入球队
var AD_join={
	api:'/api/team/join-member',
	form_data:{uid:MJS_URLArry.id,team_id:MJS_URLArry.team_id},
	tips:'申请成功',
}
//退出球队
var AD_out={
	api:'/api/team/out',
	form_data:{team_id:MJS_URLArry.team_id},
	tips:'退出成功',
}
vm=new Vue({
	el:'#Vue-body',
	data:Vue_Data,
	methods:{
		Click_Team_Join:function(){
			postData(AD_join)
		},Click_Team_Out:function(){
			postData(AD_out)
		}
	}
})
</script>
@endsection

@endsection

